<h1>Authorized Websites for <%=@user.login%></h1>

<table>
<% for allowed_website in @user.allowed_websites %>
  <tr>
    <td><%=h allowed_website.send('uri') %></td>
    <td><%= link_to 'Delete', { :action => 'destroy', :id => allowed_website }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @allowed_website_pages.current.previous } if @allowed_website_pages.current.previous %>
<%= link_to 'Next page', { :page => @allowed_website_pages.current.next } if @allowed_website_pages.current.next %> 

<br />

<%= link_to 'New Authorized Website', :action => 'new' %>
